package cn.tedu.flower.manage.content.dao.persist.repository;

import cn.tedu.flower.manage.common.pojo.vo.PageData;
import cn.tedu.flower.manage.content.pojo.entity.Address;
import cn.tedu.flower.manage.content.pojo.vo.AddressListItemVO;


public interface IAddressRepository {
    /**
     * @param address
     * @return
     */
    int insert(Address address);

    /**
     * @param id
     * @return
     */
    int deleteById(Long id);
    /**
     * @param
     * @return
     */
    int updateById(Address address);
    /**
     *
     * @param username
     * @return
     */
    AddressListItemVO getAddressByUsername(String username);
    /**
     *
     * @param
     * @return
     */
    PageData<AddressListItemVO> getAddressAll (Integer pageNum, Integer pageSize);

    /**
     *
     * @param id
     * @param isDefault
     * @return
     */
    int updateDefaultById(Long id, Integer isDefault);

}
